﻿using System;
using System.Collections.Generic;
using SqlSugar;

namespace YL.Core.Entity
{
    [SugarTable("Meter_DeviceInfo")]
    public class DeviceInfo
    {
        [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true)]
        public int DeviceId { set; get; }
        /// <summary>
        /// 用户id
        /// </summary>
        public int ClientId { set; get; } = 0;
        /// <summary>
        /// 阿里物联网平台ProductKey(唯一标识)
        /// </summary>
        public string AliProductKey { set; get; }
        /// <summary>
        /// 阿里物联网平台设备名称
        /// </summary>
        public string AliDeviceName { set; get; }
        /// <summary>
        /// 设备名称，用户注册时提供的
        /// </summary>
        public string DeviceName { set; get; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string DeviceType { set; get; }
        /// <summary>
        /// 阿里物联网平台设备密钥（需保密）
        /// </summary>
        public string AliDeviceSecret { set; get; }
        /// <summary>
        /// IP地址
        /// </summary>
        public string DeviceIp { set; get; }
        /// <summary>
        /// 设备的物联网平台id
        /// </summary>
        public string AliIotId { set; get; }
        /// <summary>
        /// 设备所关联的硬件设备编码(有编码则已分配给盒子，未关联则为空)
        /// </summary>
        public string DeviceSerialNum { set; get; }
        /// <summary>
        /// 描述信息
        /// </summary>
        public string Description { set; get; }
        /// <summary>
        /// 用户id
        /// </summary>
        public long UserId { set; get; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateDate { set; get; } = DateTime.Now;
        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public long? ModifiedBy { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public DateTime? ModifiedDate { get; set; }

        /// <summary>
        /// 设备批次
        /// </summary>
        public int DeviceBatch { get; set; }
    }
}
